# Include headers
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/tools/tetgen)

# Find tetgen
INCLUDE_DIRECTORIES(${TETGEN_INCLUDE_DIRS})
ADD_DEFINITIONS(-DTETLIBRARY)

# Enumerate source files
FILE(GLOB TEST_SRC_FILES unit_test_driver.cpp)
FILE(GLOB TEST_INC_FILES *_test.h)

ADD_EXECUTABLE(tetgen_tests ${TEST_SRC_FILES} ${TEST_INC_FILES})
TARGET_LINK_LIBRARIES(tetgen_tests Mesh tetgen_wrapper ${GTEST_BOTH_LIBRARIES})
ADD_CUSTOM_COMMAND(TARGET tetgen_tests POST_BUILD COMMAND tetgen_tests)
